package com.future.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.future.domain.DTO.RegisterUserDTO;
import com.future.domain.DTO.StudentClassDTO;
import com.future.domain.DTO.UserDTO;
import com.future.domain.Result;
import com.future.domain.User;
import org.springframework.transaction.annotation.Transactional;

public interface AdminService extends IService<User> {

    /**
     * 教师获取班级学生列表
     * @param classId 班级ID
     * @return 学生列表
     */
    Result getClassStudents(Integer pageNum, Integer pageSize, Long classId);


    Result updateClassStudentStatus(Long studentId, Integer status);


    @Transactional
    Result updateClassStudent(User user);

    /**
     * 管理员获取所有用户分页列表
     * @return 分页用户列表
     */
    Result getAllUsers(Integer pageNum, Integer pageSize);

    Result updateUserStatus(Long userId, Integer status);

    @Transactional
    Result updateUser(User user);

    Long getClassIdByUserId(Long userId);

    Result getClassNumByClassId(Long classId);


    Result auditCertification(Long certificationId, Integer status, String rejectReason);

    Result getPendingStudentClassApplications(Integer pageNum, Integer pageSize);

    Result auditStudentJoinClassApply(Long applyId, Integer status, String rejectReason);

    Result auditStudentQuitClassApply(Long applyId, Integer status, String rejectReason);

    Result contributeClass(StudentClassDTO dto);

    Result getPendingCertifications(Integer pageNum, Integer pageSize);


    Result addStudent(RegisterUserDTO dto);

    Result getStudent(Integer pageNum, Integer pageSize);
}
